package com.aya.activity.demo;

public class Demo {
    public static void main(String[] args) {
//        GoodsActivityFacade<String> goodsActivityFacade = new MyGoodsActivityFacadeAdapter();
//        GoodsPriceActivity<String> goodsDescend = goodsActivityFacade.getGoodsDescend(goodsId -> BigDecimal.valueOf(10));
//        GoodsPriceActivity<String> discount = goodsActivityFacade.getDiscount(goodsId -> BigDecimal.valueOf(0.75));
//        ScoreGiftActivity<String> scoreGiftActivity = goodsActivityFacade.getScoreGiftActivity();
//        GoodsGiftActivity<String> goodsGiftActivity = goodsActivityFacade.getGoodsGiftActivity();
//
//
//        ShopActivity fullMoney = goodsActivityFacade.getFullMoney((shopId, goods) -> goods.getPrice().compareTo(BigDecimal.valueOf(300))>=0?BigDecimal.valueOf(50):BigDecimal.ZERO);
//
//
//        Goods goods = () -> BigDecimal.valueOf(500);
//        String goodsId = "123";
//        String shopId = "shopid_1";
//
//        BigDecimal money = fullMoney.activity(shopId, goods);
//        System.out.println("商户满减活动:"+money);
//        money = discount.activity(goodsId, money);
//        System.out.println("商户折扣活动:"+money);
//        money = goodsDescend.activity(goodsId, money);
//        System.out.println("商户直降活动:"+money);
//
//        Score score = scoreGiftActivity.activity(goodsId);
//        System.out.println("赠送积分:"+score.score());
//
//        List<GoodsGift> activity = goodsGiftActivity.activity(goodsId);
//        System.out.println("赠送商品:"+activity.stream().map(GoodsGift::getId).collect(Collectors.toList()));

    }
}
